﻿var app = new Vue({
    el: '#app',
    data: {
        userName: "",
        passWord: ""
    },
    methods: {
        Login() {
            axios.post("/Account/Login", { UserName: this.userName, PassWord: this.passWord })
                .then(res => {
                    if (res.data.success) {
                        window.open('/Users');
                    } else {
                        alert(res.data.message)
                    }
                }).catch(error => {
                    console.log(error);
                });
        }
    }
})